package com.meepo.feed.old.essay

import android.os.Bundle
import android.view.View
import com.meepo.basic.router.RouterManager
import com.meepo.basic.router.RouterManager.FeedModule.FeedAttitudeUserList_Path
import com.meepo.basic.components.listfragment.ListFragmentParams
import com.meepo.basic.components.view.SwipeBackUnSupportActivity
import com.meepo.feed.R
import com.meepo.sdk.component.fragmentation.ISupportFragment
import com.xiaojinzi.component.anno.RouterAnno
import com.xiaojinzi.component.support.ParameterSupport
import kotlinx.android.synthetic.main.feed_list_attitude_stat_activity.*

@RouterAnno(hostAndPath = FeedAttitudeUserList_Path)
class AttitudeUserListActivity : SwipeBackUnSupportActivity() {

    private lateinit var mItemId: String

    override fun initData() {
    }

    override fun initView(view: View, savedInstanceState: Bundle?) {

        mItemId = ParameterSupport.getString(intent, "itemId") as String

        back_iv.setOnClickListener { finish() }

        cancel_tv.setOnClickListener {
            setResult(100)
            finish()
        }

        val fragment = RouterManager.UserModule.routeToUserListFragment(listFragmentParams = ListFragmentParams(enablePullRefresh = false))
        loadRootFragment(R.id.user_list_frame, fragment as ISupportFragment)


    }

    override fun setUpContentLayout(): Int = R.layout.feed_list_attitude_stat_activity

}